
<%@ page import="kioscodeal.User" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'user.label', default: 'User')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
	<div id="list-user" class="content scaffold-list" role="main">
			<div class="panel panel-primary">
				<div class="panel-heading">
					<h3 class="panel-title"><i class="fa fa-long-arrow-right"></i> <g:message code="default.list.label" args="[entityName]" /></h3>
				</div>
				<div class="panel-body">
					<div class="row">
						<div class="col-lg-12">
							<g:if test="${flash.message}">
								<div class="message" role="status">${flash.message}</div>
							</g:if>
									<g:if test="${userInstanceList}">
					<div class="table-responsive">
						<table class="table table-bordered table-hover tablesorter">
							<thead>
								<tr>
									<g:sortableColumn property="login" title="${message(code: 'user.login.label', default: 'Login')}" />
					
									<g:sortableColumn property="nombre" title="${message(code: 'user.nombre.label', default: 'Nombre')}" />
												
									<g:sortableColumn property="apellido" title="${message(code: 'user.apellido.label', default: 'Apellido')}" />
									
									<g:sortableColumn property="mail" title="${message(code: 'user.mail.label', default: 'Email')}" />
												
									<g:sortableColumn property="role" title="${message(code: 'user.role.label', default: 'Role')}" />
												
									<g:sortableColumn property="estado" title="${message(code: 'user.estado.label', default: 'Estado')}" />
									
									<g:sortableColumn class="text-center" property="opciones" title="Opciones" />
					
								</tr>
							</thead>
							<tbody>
								<g:each in="${userInstanceList}" status="i" var="userInstance">
									<tr class="${(i % 2) == 0 ? 'even' : 'odd'}  text-center">
					
											<td><g:link action="show" id="${userInstance.id}">${fieldValue(bean: userInstance, field: "login")}</g:link></td>
					
											<td>${fieldValue(bean: userInstance, field: "nombre")}</td>
											
											<td>${fieldValue(bean: userInstance, field: "apellido")}</td>
											
											<td>${fieldValue(bean: userInstance, field: "mail")}</td>
					
											<td>${fieldValue(bean: userInstance, field: "role")}</td>
											
											<td>${fieldValue(bean: userInstance, field: "estado")}</td>
											
											<td>
											
											<g:form url="[resource:userInstance, action:'delete']" method="DELETE">
												<fieldset class="buttons">
														<i class="fa fa-edit"></i><g:link class="edit" action="edit" resource="${userInstance}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
														<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Esta seguro?')}');" />
												</fieldset>
											</g:form>
											</td>
									</tr>
								</g:each>
							</tbody>
						</table>
					</div>
				</g:if>
				<g:else>
					No existen Usuarios dados de alta.
				</g:else>
			
				<div class="nav" role="navigation">
					<div class="row">

						<div class="col-lg-3">
							<a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a>
						</div>
						<div class="col-lg-3">							
							<g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link>
						</div>
	
					</div>					
				</div>
		</div>
	</body>
</html>